﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="Touch2Like.Web.Customer.Manage.Profile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="/css/user.css" rel="stylesheet" type="text/css" />
    <link href="/css/user_content.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        parent.ResetContentHeight("500");
        $(document).ready(function () {
            $("#tb_NewPassword").keyup(function () {
                var pwd = $(this).val();
                weak = false;
                good = false;
                strong = false;
                if(pwd.length<6)
                weak=true;
                else if(/[a-zA-Z]+/.test(pwd)&&/[0-9]+/.test(pwd)&&/[-`=\\\[\];',./~!@#$%^&*()_+|{}:"<>?]+/.test(pwd))
                  strong=true;
                else if(/[a-zA-Z]+/.test(pwd)&&/[0-9]+/.test(pwd))
                  good=true;
                else if(/[a-zA-Z]+/.test(pwd)&&/[-`=\\\[\];',./~!@#$%^&*()_+|{}:"<>?]+/.test(pwd))
                  good=true;
                else weak=true;

                if(weak)$("#lb_Msg_NewPassword").css("color","#df0b0b").text("weak");
                else if(good)$("#lb_Msg_NewPassword").css("color","green").text("good");
                else if(strong)$("#lb_Msg_NewPassword").css("color","green").text("strong");
            });

            setTimeout(function () { parent.ResetContentHeight($("body").height()); }, 500);
        });

        function ClickFormButton(btnid) {
            if (btnid == "btn_ChangePassword") {
                if($.trim($("#tb_OldPassword").val())!=""&&$.trim($("#tb_OldPassword").val())!=$.trim($("#tb_Password").val())){
                    $("#lb_Msg_Password").text("Invalid password");
                    return false;
                }
                else if ($.trim($("#tb_NewPassword").val()) == "") {
                    $("#lb_Msg_NewPassword").text("Please type in a valid password");
                    return false;
                }else if($.trim($("#tb_NewPassword").val()).length<6){
                    $("#lb_Msg_NewPassword").text("The password is too weak");
                    return false;
                }else if ($.trim($("#tb_NewPassword").val()) != $.trim($("#tb_ConfirmPassword").val())) {
                    $("#lb_Msg_ConfirmPassword").text("Please check your password");
                    return false;
                }
            }
            $("#" + btnid).click();
        }
    </script>
</head>
<body style="overflow: hidden;">
    <form id="form1" runat="server" class="form">
    <div class="detail-container">
        <div class="header">
            <h3>
                Profile Setup</h3>
        </div>
        <div class="content">
            <div class="section-wrap">
                <div class="container">
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            First Name:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_FirstName" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Last Name:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_LastName" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Business Name:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_BusinessName" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Address Line1:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_AddressLine1" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Address Line2:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_AddressLine2" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            City:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_City" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            State:</label>
                        <div class="text-widget-view">
                            <asp:DropDownList ID="ddl_State" runat="server" Width="150px" Height="30px" CssClass="field">
                                <asp:ListItem Value="AL" Text="Alabama"></asp:ListItem>
                                <asp:ListItem Value="AK" Text="Alaska"></asp:ListItem>
                                <asp:ListItem Value="AZ" Text="Arizona"></asp:ListItem>
                                <asp:ListItem Value="AR" Text="Arkansas"></asp:ListItem>
                                <asp:ListItem Value="CA" Text="California"></asp:ListItem>
                                <asp:ListItem Value="CO" Text="Colorado"></asp:ListItem>
                                <asp:ListItem Value="CT" Text="Connecticut"></asp:ListItem>
                                <asp:ListItem Value="DE" Text="Delaware"></asp:ListItem>
                                <asp:ListItem Value="DC" Text="District Of Columbia"></asp:ListItem>
                                <asp:ListItem Value="FL" Text="Florida"></asp:ListItem>
                                <asp:ListItem Value="GA" Text="Georgia"></asp:ListItem>
                                <asp:ListItem Value="HI" Text="Hawaii"></asp:ListItem>
                                <asp:ListItem Value="ID" Text="Idaho"></asp:ListItem>
                                <asp:ListItem Value="IL" Text="Illinois"></asp:ListItem>
                                <asp:ListItem Value="IN" Text="Indiana"></asp:ListItem>
                                <asp:ListItem Value="IA" Text="Iowa"></asp:ListItem>
                                <asp:ListItem Value="KS" Text="Kansas"></asp:ListItem>
                                <asp:ListItem Value="KY" Text="Kentucky"></asp:ListItem>
                                <asp:ListItem Value="LA" Text="Louisiana"></asp:ListItem>
                                <asp:ListItem Value="ME" Text="Maine"></asp:ListItem>
                                <asp:ListItem Value="MD" Text="Maryland"></asp:ListItem>
                                <asp:ListItem Value="MA" Text="Massachusetts"></asp:ListItem>
                                <asp:ListItem Value="MI" Text="Michigan"></asp:ListItem>
                                <asp:ListItem Value="MN" Text="Minnesota"></asp:ListItem>
                                <asp:ListItem Value="MS" Text="Mississippi"></asp:ListItem>
                                <asp:ListItem Value="MO" Text="Missouri"></asp:ListItem>
                                <asp:ListItem Value="MT" Text="Montana"></asp:ListItem>
                                <asp:ListItem Value="NE" Text="Nebraska"></asp:ListItem>
                                <asp:ListItem Value="NV" Text="Nevada"></asp:ListItem>
                                <asp:ListItem Value="NH" Text="New Hampshire"></asp:ListItem>
                                <asp:ListItem Value="NJ" Text="New Jersey"></asp:ListItem>
                                <asp:ListItem Value="NM" Text="New Mexico"></asp:ListItem>
                                <asp:ListItem Value="NY" Text="New York"></asp:ListItem>
                                <asp:ListItem Value="NC" Text="North Carolina"></asp:ListItem>
                                <asp:ListItem Value="ND" Text="North Dakota"></asp:ListItem>
                                <asp:ListItem Value="OH" Text="Ohio"></asp:ListItem>
                                <asp:ListItem Value="OK" Text="Oklahoma"></asp:ListItem>
                                <asp:ListItem Value="OR" Text="Oregon"></asp:ListItem>
                                <asp:ListItem Value="PA" Text="Pennsylvania"></asp:ListItem>
                                <asp:ListItem Value="RI" Text="Rhode Island"></asp:ListItem>
                                <asp:ListItem Value="SC" Text="South Carolina"></asp:ListItem>
                                <asp:ListItem Value="SD" Text="South Dakota"></asp:ListItem>
                                <asp:ListItem Value="TN" Text="Tennessee"></asp:ListItem>
                                <asp:ListItem Value="TX" Text="Texas"></asp:ListItem>
                                <asp:ListItem Value="UT" Text="Utah"></asp:ListItem>
                                <asp:ListItem Value="VT" Text="Vermont"></asp:ListItem>
                                <asp:ListItem Value="VA" Text="Virginia"></asp:ListItem>
                                <asp:ListItem Value="WA" Text="Washington"></asp:ListItem>
                                <asp:ListItem Value="WV" Text="West Virginia"></asp:ListItem>
                                <asp:ListItem Value="WI" Text="Wisconsin"></asp:ListItem>
                                <asp:ListItem Value="WY" Text="Wyoming"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Zip Code:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_Zipcode" runat="server" CssClass="field"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Logo:</label>
                        <div class="text-widget-view">
                            <asp:Image ID="img_Logo" runat="server" ImageUrl="/img/logo.png" />
                        </div>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            &nbsp;</label>
                        <div class="text-widget-view">
                            <asp:FileUpload ID="file_Logo" runat="server" style="width:auto;" />
                        </div>
                    </div>
                    <div>
                        <button class="button medium blue" onclick="ClickFormButton('btn_Save')">
                            <span style="padding-top: 0px; padding-bottom: 0px;">Save</span></button>
                        <asp:Button ID="btn_Save" runat="server" CssClass="button medium blue" OnClick="btn_Save_Click"
                            Text="Save" Style="display: none" /></div>
                </div>
            </div>
            <div class="section-wrap">
                <div class="container">
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Old password:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_Password" runat="server" CssClass="field" TextMode="Password"></asp:TextBox>
                            <asp:HiddenField ID="tb_OldPassword" runat="server" />
                        </div>
                        <asp:Label ID="lb_Msg_Password" runat="server" CssClass="field_error"></asp:Label>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            New password:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_NewPassword" runat="server" CssClass="field" TextMode="Password"></asp:TextBox>
                        </div>
                        <asp:Label ID="lb_Msg_NewPassword" runat="server" CssClass="field_error"></asp:Label>
                    </div>
                    <div class="form-field-view form-row">
                        <label class="default-label">
                            Confirm password:</label>
                        <div class="text-widget-view">
                            <asp:TextBox ID="tb_ConfirmPassword" runat="server" CssClass="field" TextMode="Password"></asp:TextBox>
                        </div>
                        <asp:Label ID="lb_Msg_ConfirmPassword" runat="server" CssClass="field_error"></asp:Label>
                    </div>
                    <div>
                        <button class="button medium blue" onclick="ClickFormButton('btn_ChangePassword')"
                            type="button">
                            <span style="padding-top: 0px; padding-bottom: 0px;">Change password</span></button>
                        <asp:Button ID="btn_ChangePassword" runat="server" CssClass="button medium blue"
                            OnClick="btn_ChangePassword_Click" Text="Change password" Style="display: none" /></div>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
